Release 10.1A: OpenEdge Development:
Progress Dynamics Basic Development
Creating and editing SDOs
You can use the Object Generator to create and edit SDOs.
![]()
To edit an SDO created with the Object Generator:
- In the AppBuilder, you can open the SDO either as a file, because it is a procedural object, or as an object, because the SDO was created in the framework and it is registered in the Progress Dynamics Repository:
- To open it as a procedure, select File
Open File or choose Open File from the AppBuilder toolbar. The standard operating system File Open dialog box appears. Select the SDO with its
.wfilename extension.- To open the SDO as an object, select File
Open Object or choose Open Object in the toolbar. The Open Object dialog box appears. It shows the object name without the filename extension, because the object name is only the simple filename.
Locate the object based not on the operating system directory it is in, but by its Product Module or Object Type, as shown:
![]()
Either way, a design window for the SDO appears, as shown:
![]()
The SDO, as a nonvisual object, has no real window. This design window lets you get at its properties.
- To bring up the SDO’s properties, as with any AppBuilder design window, you can double-click on the window or choose the Object Properties toolbar button, as shown:
![]()
From the property sheet, you can edit the SDO’s query, for example, to add another table to the primary table, or choose Fields to modify the field list for the SDO, to remove fields, to add fields from a new table, or to change the updateable setting for one or more fields.
- To edit the SDO’s query do one of the following:
- After opening an object, editing it in any way in its property sheet and other dialog boxes, and returning to the design window, remember to choose Save from the design window. Changes are only held in memory until you save. This allows you to go in and out of a property sheet more than once before finishing your changes.
The OpenEdgeŽ product documentation describes all of these options in more detail. They are presented here just so that you know where to look to make the kinds of changes you are likely to make to the SDOs you have generated.
You might also want to create additional SDOs, either to join tables in different ways or to create objects with different field lists. You should create additional SDOs with care, however. If you want to create SDOs designed specifically for browsing small numbers of columns efficiently so that users can look up a record to edit in another page or window, that is fine. Avoid a situation where different parts of your application are updating records through different SDOs on the same table, because then you can be at risk of not having your business logic execute consistently.
Generally, let your full SDO be the only one through which updates are done; create others as needed for browsing or specialized joins. And keep in mind that having fully dynamic SDOs, the temp-table definitions for the SDOs have become dynamic as well, so that the dynamic SDO can support a variable
Note: The standard AppBuilder preference (Optionsfieldlistas a property of the object. This removes the need to have multiple SDOs just to modify thefieldlist. Thefieldlistis a property you can set for the dynamic SDO.Preferences) Qualify Database Fields with a Database Name must be turned off to create and edit SDOs in Progress Dynamics. Errors occur when trying to save an SDO when this option is enabled.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |